<?php
  require(dirname(__FILE__).'/global.php');
  require(ROOT.'/admin/isLogin.php');
                                                             
  $submit = $_POST['submit'];
  if(isset($submit))
  {
      require(ROOT.'/include/file.class.php');
      $flag = false;               
      $dir = ROOT.'/cache/';
      $flag = FileUtil::deleteDir($dir);
      if($flag)
      {                                      
          $smarty->assign('tip','更新缓存成功');
      }  
      else
      {                                     
          $smarty->assign('tip','更新缓存失败');
      }  
  }
  $smarty->display('cache_update.html');
  $db->close();
?>
